/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.topic.entity;

import com.jeeplus.modules.topic.entity.Topic;
import javax.validation.constraints.NotNull;
import com.jeeplus.modules.tickettype.entity.TicketType;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import lombok.Data;

/**
 * 门票Entity
 * @author zhych
 * @version 2021-08-23
 */
@Data
public class TopicTicket extends DataEntity<TopicTicket> {
	
	private static final long serialVersionUID = 1L;
	@NotNull(message="活动不能为空")
	private Topic topic;		// 活动 父类
	@ExcelField(title="开始时间", align=2, sort=2)
	private String startTime;		// 开始时间
	@ExcelField(title="结束时间", align=2, sort=3)
	private String endTime;		// 结束时间
	@NotNull(message="门票类型不能为空")
	@ExcelField(title="门票类型", fieldType=TicketType.class, value="ticketType.title", align=2, sort=4)
	private TicketType ticketType;		// 门票类型
	@ExcelField(title="票价", align=2, sort=5)
	private String price;		// 票价
	@NotNull(message="库存不能为空")
	@ExcelField(title="库存", align=2, sort=6)
	private Integer stock;		// 库存
	@NotNull(message="警戒值不能为空")
	@ExcelField(title="警戒值", align=2, sort=7)
	private Integer limitValue;		// 警戒值
	@NotNull(message="销量不能为空")
	@ExcelField(title="销量", align=2, sort=8)
	private Integer salesVolue;		// 销量
	@NotNull(message="剩余不能为空")
	@ExcelField(title="剩余", align=2, sort=9)
	private Integer surplus;		// 剩余
	
	public TopicTicket() {
		super();
	}

	public TopicTicket(String id){
		super(id);
	}

	public TopicTicket(Topic topic){
		this.topic = topic;
	}

}